package ml

import org.apache.spark.ml.classification.LogisticRegression
import org.apache.spark.ml.linalg.Vectors
import org.apache.spark.ml.classification.LogisticRegressionModel
import org.apache.spark.sql.SparkSession

object UsePersonModel {
  def main(args: Array[String]): Unit = {
    val spark: SparkSession = SparkSession
      .builder()
      .master("local")
      .appName("point")
      .getOrCreate()
    val model : LogisticRegressionModel = LogisticRegressionModel.load( "spark/data/models/person_model")
    val num :Double = model.predict(Vectors.dense(5.8, 5.0, 3.7, 148.7, 90.1, 76.2, 65))
    println(num)
  }

}
